﻿using Common;
using Network.UpdateData;
using System.Collections.Generic;
using System.Net.Sockets;

namespace SFJDService.SocketHandle
{
    class PH02PublishWinner : PacketHandle
    {
        public PH02PublishWinner(Socket socket, Packet packet) : base(socket, packet) { }

        protected override void Handle()
        {
            if (Message.Equals(Runtime.myIP))
            {
                List<ClassBrigade> brigades = Runtime.xmlBrigade.GetAll();
                foreach (ClassBrigade bri in brigades)
                {
                    Launcher.SendMsg2All(typeof(PH02AddBrigade).GetDictianaryKey(), bri.Coding2String());
                    Delay(100);
                }
            }
        }
    }
}
